package com.zhan.drugStore.util;


@SuppressWarnings("serial")
public class ResponsePageBean<T> extends ResponseBean<T>
{
	private long count = 0;

	public long getCount()
	{
		return count;
	}

	public void setCount(long count)
	{
		this.count = count;
	}

	public ResponsePageBean<T> success(long count, T data)
	{
		super.success(data);
		this.count = count;
		return this;
	}
	
	public ResponsePageBean<T> fail(int code, String message)
	{
		super.setCode(code);
		super.setMessage(message);
		return this;
	}
	
	@Override
	public String toString()
	{
		return String.format("%s, entity->%s", super.toString(), this.count);
	}
}
